3.200 \(\int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c+d \sec (e+f x))^4} \, dx\)

Optimal. Leaf size=213 \[ \frac {a^2 (3 c-2 d) \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{f (c-d)^{3/2} (c+d)^{7/2}}+\frac {a^2 (3 c-2 d) \tan (e+f x)}{2 f (c-d) (c+d)^3 (c+d \sec (e+f x))}+\frac {(3 c-2 d) \tan (e+f x) \left (a^2 \sec (e+f x)+a^2\right )}{6 f (c-d) (c+d)^2 (c+d \sec (e+f x))^2}-\frac {d \tan (e+f x) (a \sec (e+f x)+a)^2}{3 f \left (c^2-d^2\right ) (c+d \sec (e+f x))^3} \]

[Out]

a^2*(3*c-2*d)*arctanh((c-d)^(1/2)*tan(1/2*e+1/2*f*x)/(c+d)^(1/2))/(c-d)^(3/2)/(c+d)^(7/2)/f-1/3*d*(a+a*sec(f*x
+e))^2*tan(f*x+e)/(c^2-d^2)/f/(c+d*sec(f*x+e))^3+1/6*(3*c-2*d)*(a^2+a^2*sec(f*x+e))*tan(f*x+e)/(c-d)/(c+d)^2/f
/(c+d*sec(f*x+e))^2+1/2*a^2*(3*c-2*d)*tan(f*x+e)/(c-d)/(c+d)^3/f/(c+d*sec(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.28, antiderivative size = 268, normalized size of antiderivative = 1.26, number of steps used = 6, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3987, 96, 94, 93, 205} \[ -\frac {a^3 (3 c-2 d) \tan (e+f x) \tan ^{-1}\left (\frac {\sqrt {c+d} \sqrt {a \sec (e+f x)+a}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right )}{f (c-d)^{3/2} (c+d)^{7/2} \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {a^2 (3 c-2 d) \tan (e+f x)}{2 f (c-d) (c+d)^3 (c+d \sec (e+f x))}+\frac {(3 c-2 d) \tan (e+f x) \left (a^2 \sec (e+f x)+a^2\right )}{6 f (c-d) (c+d)^2 (c+d \sec (e+f x))^2}-\frac {d \tan (e+f x) (a \sec (e+f x)+a)^2}{3 f \left (c^2-d^2\right ) (c+d \sec (e+f x))^3} \]

Antiderivative was successfully verified.

[In]

Int[(Sec[e + f*x]*(a + a*Sec[e + f*x])^2)/(c + d*Sec[e + f*x])^4,x]

[Out]

-((a^3*(3*c - 2*d)*ArcTan[(Sqrt[c + d]*Sqrt[a + a*Sec[e + f*x]])/(Sqrt[c - d]*Sqrt[a - a*Sec[e + f*x]])]*Tan[e
 + f*x])/((c - d)^(3/2)*(c + d)^(7/2)*f*Sqrt[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]])) - (d*(a + a*Sec[e
+ f*x])^2*Tan[e + f*x])/(3*(c^2 - d^2)*f*(c + d*Sec[e + f*x])^3) + ((3*c - 2*d)*(a^2 + a^2*Sec[e + f*x])*Tan[e
 + f*x])/(6*(c - d)*(c + d)^2*f*(c + d*Sec[e + f*x])^2) + (a^2*(3*c - 2*d)*Tan[e + f*x])/(2*(c - d)*(c + d)^3*
f*(c + d*Sec[e + f*x]))

Rule 93

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 94

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[((a + b
*x)^(m + 1)*(c + d*x)^n*(e + f*x)^(p + 1))/((m + 1)*(b*e - a*f)), x] - Dist[(n*(d*e - c*f))/((m + 1)*(b*e - a*
f)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, p}, x] && EqQ[
m + n + p + 2, 0] && GtQ[n, 0] &&  !(SumSimplerQ[p, 1] &&  !SumSimplerQ[m, 1])

Rule 96

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(a +
 b*x)^(m + 1)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/((m + 1)*(b*c - a*d)*(b*e - a*f)), x] + Dist[(a*d*f*(m + 1)
 + b*c*f*(n + 1) + b*d*e*(p + 1))/((m + 1)*(b*c - a*d)*(b*e - a*f)), Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*
x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[Simplify[m + n + p + 3], 0] && (LtQ[m, -1] || Sum
SimplerQ[m, 1])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 3987

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[(a^2*g*Cot[e + f*x])/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x
]]), Subst[Int[((g*x)^(p - 1)*(a + b*x)^(m - 1/2)*(c + d*x)^n)/Sqrt[a - b*x], x], x, Csc[e + f*x]], x] /; Free
Q[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p,
 1] || IntegerQ[m - 1/2])

Rubi steps

\begin {align*} \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c+d \sec (e+f x))^4} \, dx &=-\frac {\left (a^2 \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {(a+a x)^{3/2}}{\sqrt {a-a x} (c+d x)^4} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=-\frac {d (a+a \sec (e+f x))^2 \tan (e+f x)}{3 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^3}-\frac {\left (a^2 (3 c-2 d) \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {(a+a x)^{3/2}}{\sqrt {a-a x} (c+d x)^3} \, dx,x,\sec (e+f x)\right )}{3 \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=-\frac {d (a+a \sec (e+f x))^2 \tan (e+f x)}{3 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^3}+\frac {(3 c-2 d) \left (a^2+a^2 \sec (e+f x)\right ) \tan (e+f x)}{6 (c-d) (c+d)^2 f (c+d \sec (e+f x))^2}-\frac {\left (a^3 (3 c-2 d) \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {\sqrt {a+a x}}{\sqrt {a-a x} (c+d x)^2} \, dx,x,\sec (e+f x)\right )}{2 (c+d) \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=-\frac {d (a+a \sec (e+f x))^2 \tan (e+f x)}{3 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^3}+\frac {(3 c-2 d) \left (a^2+a^2 \sec (e+f x)\right ) \tan (e+f x)}{6 (c-d) (c+d)^2 f (c+d \sec (e+f x))^2}+\frac {a^2 (3 c-2 d) \tan (e+f x)}{2 (c-d) (c+d)^3 f (c+d \sec (e+f x))}-\frac {\left (a^4 (3 c-2 d) \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{2 (c+d)^2 \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=-\frac {d (a+a \sec (e+f x))^2 \tan (e+f x)}{3 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^3}+\frac {(3 c-2 d) \left (a^2+a^2 \sec (e+f x)\right ) \tan (e+f x)}{6 (c-d) (c+d)^2 f (c+d \sec (e+f x))^2}+\frac {a^2 (3 c-2 d) \tan (e+f x)}{2 (c-d) (c+d)^3 f (c+d \sec (e+f x))}-\frac {\left (a^4 (3 c-2 d) \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {1}{a c-a d-(-a c-a d) x^2} \, dx,x,\frac {\sqrt {a+a \sec (e+f x)}}{\sqrt {a-a \sec (e+f x)}}\right )}{(c+d)^2 \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=-\frac {a^3 (3 c-2 d) \tan ^{-1}\left (\frac {\sqrt {c+d} \sqrt {a+a \sec (e+f x)}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right ) \tan (e+f x)}{(c-d)^{3/2} (c+d)^{7/2} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {d (a+a \sec (e+f x))^2 \tan (e+f x)}{3 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^3}+\frac {(3 c-2 d) \left (a^2+a^2 \sec (e+f x)\right ) \tan (e+f x)}{6 (c-d) (c+d)^2 f (c+d \sec (e+f x))^2}+\frac {a^2 (3 c-2 d) \tan (e+f x)}{2 (c-d) (c+d)^3 f (c+d \sec (e+f x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 4.78, size = 211, normalized size = 0.99 \[ \frac {a^2 (c-d)^2 \left (24 (3 c-2 d) (c \cos (e+f x)+d)^3 \tanh ^{-1}\left (\frac {(d-c) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )-2 \sqrt {c^2-d^2} \sin (e+f x) \left (12 c^3-5 c^2 d+6 \left (c^3+6 c^2 d-7 c d^2-2 d^3\right ) \cos (e+f x)+\left (12 c^3-7 c^2 d-6 c d^2-2 d^3\right ) \cos (2 (e+f x))+6 c d^2-22 d^3\right )\right )}{24 f (d-c)^3 (c+d)^3 \sqrt {c^2-d^2} (c \cos (e+f x)+d)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[e + f*x]*(a + a*Sec[e + f*x])^2)/(c + d*Sec[e + f*x])^4,x]

[Out]

(a^2*(c - d)^2*(24*(3*c - 2*d)*ArcTanh[((-c + d)*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]]*(d + c*Cos[e + f*x])^3 - 2
*Sqrt[c^2 - d^2]*(12*c^3 - 5*c^2*d + 6*c*d^2 - 22*d^3 + 6*(c^3 + 6*c^2*d - 7*c*d^2 - 2*d^3)*Cos[e + f*x] + (12
*c^3 - 7*c^2*d - 6*c*d^2 - 2*d^3)*Cos[2*(e + f*x)])*Sin[e + f*x]))/(24*(-c + d)^3*(c + d)^3*Sqrt[c^2 - d^2]*f*
(d + c*Cos[e + f*x])^3)

________________________________________________________________________________________

fricas [B]  time = 0.55, size = 1234, normalized size = 5.79 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c+d*sec(f*x+e))^4,x, algorithm="fricas")

[Out]

[1/12*(3*(3*a^2*c*d^3 - 2*a^2*d^4 + (3*a^2*c^4 - 2*a^2*c^3*d)*cos(f*x + e)^3 + 3*(3*a^2*c^3*d - 2*a^2*c^2*d^2)
*cos(f*x + e)^2 + 3*(3*a^2*c^2*d^2 - 2*a^2*c*d^3)*cos(f*x + e))*sqrt(c^2 - d^2)*log((2*c*d*cos(f*x + e) - (c^2
 - 2*d^2)*cos(f*x + e)^2 + 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + c)*sin(f*x + e) + 2*c^2 - d^2)/(c^2*cos(f*x + e
)^2 + 2*c*d*cos(f*x + e) + d^2)) + 2*(a^2*c^4*d + 6*a^2*c^3*d^2 - 11*a^2*c^2*d^3 - 6*a^2*c*d^4 + 10*a^2*d^5 +
(12*a^2*c^5 - 7*a^2*c^4*d - 18*a^2*c^3*d^2 + 5*a^2*c^2*d^3 + 6*a^2*c*d^4 + 2*a^2*d^5)*cos(f*x + e)^2 + 3*(a^2*
c^5 + 6*a^2*c^4*d - 8*a^2*c^3*d^2 - 8*a^2*c^2*d^3 + 7*a^2*c*d^4 + 2*a^2*d^5)*cos(f*x + e))*sin(f*x + e))/((c^9
 + 2*c^8*d - c^7*d^2 - 4*c^6*d^3 - c^5*d^4 + 2*c^4*d^5 + c^3*d^6)*f*cos(f*x + e)^3 + 3*(c^8*d + 2*c^7*d^2 - c^
6*d^3 - 4*c^5*d^4 - c^4*d^5 + 2*c^3*d^6 + c^2*d^7)*f*cos(f*x + e)^2 + 3*(c^7*d^2 + 2*c^6*d^3 - c^5*d^4 - 4*c^4
*d^5 - c^3*d^6 + 2*c^2*d^7 + c*d^8)*f*cos(f*x + e) + (c^6*d^3 + 2*c^5*d^4 - c^4*d^5 - 4*c^3*d^6 - c^2*d^7 + 2*
c*d^8 + d^9)*f), 1/6*(3*(3*a^2*c*d^3 - 2*a^2*d^4 + (3*a^2*c^4 - 2*a^2*c^3*d)*cos(f*x + e)^3 + 3*(3*a^2*c^3*d -
 2*a^2*c^2*d^2)*cos(f*x + e)^2 + 3*(3*a^2*c^2*d^2 - 2*a^2*c*d^3)*cos(f*x + e))*sqrt(-c^2 + d^2)*arctan(-sqrt(-
c^2 + d^2)*(d*cos(f*x + e) + c)/((c^2 - d^2)*sin(f*x + e))) + (a^2*c^4*d + 6*a^2*c^3*d^2 - 11*a^2*c^2*d^3 - 6*
a^2*c*d^4 + 10*a^2*d^5 + (12*a^2*c^5 - 7*a^2*c^4*d - 18*a^2*c^3*d^2 + 5*a^2*c^2*d^3 + 6*a^2*c*d^4 + 2*a^2*d^5)
*cos(f*x + e)^2 + 3*(a^2*c^5 + 6*a^2*c^4*d - 8*a^2*c^3*d^2 - 8*a^2*c^2*d^3 + 7*a^2*c*d^4 + 2*a^2*d^5)*cos(f*x
+ e))*sin(f*x + e))/((c^9 + 2*c^8*d - c^7*d^2 - 4*c^6*d^3 - c^5*d^4 + 2*c^4*d^5 + c^3*d^6)*f*cos(f*x + e)^3 +
3*(c^8*d + 2*c^7*d^2 - c^6*d^3 - 4*c^5*d^4 - c^4*d^5 + 2*c^3*d^6 + c^2*d^7)*f*cos(f*x + e)^2 + 3*(c^7*d^2 + 2*
c^6*d^3 - c^5*d^4 - 4*c^4*d^5 - c^3*d^6 + 2*c^2*d^7 + c*d^8)*f*cos(f*x + e) + (c^6*d^3 + 2*c^5*d^4 - c^4*d^5 -
 4*c^3*d^6 - c^2*d^7 + 2*c*d^8 + d^9)*f)]

________________________________________________________________________________________

giac [B]  time = 1.11, size = 420, normalized size = 1.97 \[ -\frac {\frac {3 \, {\left (3 \, a^{2} c - 2 \, a^{2} d\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, c - 2 \, d\right ) + \arctan \left (\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c^{2} + d^{2}}}\right )\right )}}{{\left (c^{4} + 2 \, c^{3} d - 2 \, c d^{3} - d^{4}\right )} \sqrt {-c^{2} + d^{2}}} + \frac {9 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 24 \, a^{2} c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 21 \, a^{2} c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 6 \, a^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 24 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 16 \, a^{2} c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 24 \, a^{2} c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 16 \, a^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 15 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 12 \, a^{2} c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 21 \, a^{2} c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 18 \, a^{2} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (c^{4} + 2 \, c^{3} d - 2 \, c d^{3} - d^{4}\right )} {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c - d\right )}^{3}}}{3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c+d*sec(f*x+e))^4,x, algorithm="giac")

[Out]

-1/3*(3*(3*a^2*c - 2*a^2*d)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(2*c - 2*d) + arctan((c*tan(1/2*f*x + 1/2*e)
- d*tan(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))/((c^4 + 2*c^3*d - 2*c*d^3 - d^4)*sqrt(-c^2 + d^2)) + (9*a^2*c^3*t
an(1/2*f*x + 1/2*e)^5 - 24*a^2*c^2*d*tan(1/2*f*x + 1/2*e)^5 + 21*a^2*c*d^2*tan(1/2*f*x + 1/2*e)^5 - 6*a^2*d^3*
tan(1/2*f*x + 1/2*e)^5 - 24*a^2*c^3*tan(1/2*f*x + 1/2*e)^3 + 16*a^2*c^2*d*tan(1/2*f*x + 1/2*e)^3 + 24*a^2*c*d^
2*tan(1/2*f*x + 1/2*e)^3 - 16*a^2*d^3*tan(1/2*f*x + 1/2*e)^3 + 15*a^2*c^3*tan(1/2*f*x + 1/2*e) + 12*a^2*c^2*d*
tan(1/2*f*x + 1/2*e) - 21*a^2*c*d^2*tan(1/2*f*x + 1/2*e) - 18*a^2*d^3*tan(1/2*f*x + 1/2*e))/((c^4 + 2*c^3*d -
2*c*d^3 - d^4)*(c*tan(1/2*f*x + 1/2*e)^2 - d*tan(1/2*f*x + 1/2*e)^2 - c - d)^3))/f

________________________________________________________________________________________

maple [A]  time = 0.83, size = 228, normalized size = 1.07 \[ \frac {8 a^{2} \left (-\frac {\frac {\left (3 c -2 d \right ) \left (c -d \right ) \left (\tan ^{5}\left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{8 c^{3}+24 c^{2} d +24 c \,d^{2}+8 d^{3}}-\frac {\left (3 c -2 d \right ) \left (\tan ^{3}\left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{3 \left (c^{2}+2 c d +d^{2}\right )}+\frac {\left (5 c -6 d \right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{8 \left (c +d \right ) \left (c -d \right )}}{\left (\left (\tan ^{2}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) c -\left (\tan ^{2}\left (\frac {e}{2}+\frac {f x}{2}\right )\right ) d -c -d \right )^{3}}+\frac {\left (3 c -2 d \right ) \arctanh \left (\frac {\tan \left (\frac {e}{2}+\frac {f x}{2}\right ) \left (c -d \right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{8 \left (c^{4}+2 c^{3} d -2 c \,d^{3}-d^{4}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c+d*sec(f*x+e))^4,x)

[Out]

8/f*a^2*(-(1/8*(3*c-2*d)*(c-d)/(c^3+3*c^2*d+3*c*d^2+d^3)*tan(1/2*e+1/2*f*x)^5-1/3*(3*c-2*d)/(c^2+2*c*d+d^2)*ta
n(1/2*e+1/2*f*x)^3+1/8*(5*c-6*d)/(c+d)/(c-d)*tan(1/2*e+1/2*f*x))/(tan(1/2*e+1/2*f*x)^2*c-tan(1/2*e+1/2*f*x)^2*
d-c-d)^3+1/8*(3*c-2*d)/(c^4+2*c^3*d-2*c*d^3-d^4)/((c+d)*(c-d))^(1/2)*arctanh(tan(1/2*e+1/2*f*x)*(c-d)/((c+d)*(
c-d))^(1/2)))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c+d*sec(f*x+e))^4,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*c^2-4*d^2>0)', see `assume?`
 for more details)Is 4*c^2-4*d^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 5.09, size = 286, normalized size = 1.34 \[ \frac {\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (3\,a^2\,c^2-5\,a^2\,c\,d+2\,a^2\,d^2\right )}{{\left (c+d\right )}^3}-\frac {8\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (3\,a^2\,c-2\,a^2\,d\right )}{3\,{\left (c+d\right )}^2}+\frac {a^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (5\,c-6\,d\right )}{\left (c+d\right )\,\left (c-d\right )}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (-3\,c^3-3\,c^2\,d+3\,c\,d^2+3\,d^3\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (-3\,c^3+3\,c^2\,d+3\,c\,d^2-3\,d^3\right )+3\,c\,d^2+3\,c^2\,d+c^3+d^3-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (c^3-3\,c^2\,d+3\,c\,d^2-d^3\right )\right )}+\frac {2\,a^2\,\mathrm {atanh}\left (\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\sqrt {c-d}}{\sqrt {c+d}}\right )\,\left (\frac {3\,c}{2}-d\right )}{f\,{\left (c+d\right )}^{7/2}\,{\left (c-d\right )}^{3/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(e + f*x))^2/(cos(e + f*x)*(c + d/cos(e + f*x))^4),x)

[Out]

((tan(e/2 + (f*x)/2)^5*(3*a^2*c^2 + 2*a^2*d^2 - 5*a^2*c*d))/(c + d)^3 - (8*tan(e/2 + (f*x)/2)^3*(3*a^2*c - 2*a
^2*d))/(3*(c + d)^2) + (a^2*tan(e/2 + (f*x)/2)*(5*c - 6*d))/((c + d)*(c - d)))/(f*(tan(e/2 + (f*x)/2)^2*(3*c*d
^2 - 3*c^2*d - 3*c^3 + 3*d^3) - tan(e/2 + (f*x)/2)^4*(3*c*d^2 + 3*c^2*d - 3*c^3 - 3*d^3) + 3*c*d^2 + 3*c^2*d +
 c^3 + d^3 - tan(e/2 + (f*x)/2)^6*(3*c*d^2 - 3*c^2*d + c^3 - d^3))) + (2*a^2*atanh((tan(e/2 + (f*x)/2)*(c - d)
^(1/2))/(c + d)^(1/2))*((3*c)/2 - d))/(f*(c + d)^(7/2)*(c - d)^(3/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int \frac {\sec {\left (e + f x \right )}}{c^{4} + 4 c^{3} d \sec {\left (e + f x \right )} + 6 c^{2} d^{2} \sec ^{2}{\left (e + f x \right )} + 4 c d^{3} \sec ^{3}{\left (e + f x \right )} + d^{4} \sec ^{4}{\left (e + f x \right )}}\, dx + \int \frac {2 \sec ^{2}{\left (e + f x \right )}}{c^{4} + 4 c^{3} d \sec {\left (e + f x \right )} + 6 c^{2} d^{2} \sec ^{2}{\left (e + f x \right )} + 4 c d^{3} \sec ^{3}{\left (e + f x \right )} + d^{4} \sec ^{4}{\left (e + f x \right )}}\, dx + \int \frac {\sec ^{3}{\left (e + f x \right )}}{c^{4} + 4 c^{3} d \sec {\left (e + f x \right )} + 6 c^{2} d^{2} \sec ^{2}{\left (e + f x \right )} + 4 c d^{3} \sec ^{3}{\left (e + f x \right )} + d^{4} \sec ^{4}{\left (e + f x \right )}}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))**2/(c+d*sec(f*x+e))**4,x)

[Out]

a**2*(Integral(sec(e + f*x)/(c**4 + 4*c**3*d*sec(e + f*x) + 6*c**2*d**2*sec(e + f*x)**2 + 4*c*d**3*sec(e + f*x
)**3 + d**4*sec(e + f*x)**4), x) + Integral(2*sec(e + f*x)**2/(c**4 + 4*c**3*d*sec(e + f*x) + 6*c**2*d**2*sec(
e + f*x)**2 + 4*c*d**3*sec(e + f*x)**3 + d**4*sec(e + f*x)**4), x) + Integral(sec(e + f*x)**3/(c**4 + 4*c**3*d
*sec(e + f*x) + 6*c**2*d**2*sec(e + f*x)**2 + 4*c*d**3*sec(e + f*x)**3 + d**4*sec(e + f*x)**4), x))

________________________________________________________________________________________